# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         center
# Description:
# Author:       asus
# Date:         2019/2/28
#-------------------------------------------------------------------------------


#使用center方法让"hello"在宽度为30居中显示，两侧填充空格
print("<"+"hello".center(30)+">")

#使用format方法
print("<{:^30}>".format("hello"))

#两边填充*
print("<"+"hello".center(30,"*")+">")
print("<{:*^30}>".format("hello"))